#!/usr/bin/env bash

# Fail if any commands fails
set -x

# Run snapshot tests:

readonly scripts_path="$( cd "$(dirname "$0")" ; pwd -P )"
readonly root_directory=`"${scripts_path}/repository-root-path"`

cd "${root_directory}"

xcodebuild test -destination name="Apple TV" -scheme "SkeletonUISnapshotTests"
xcodebuild test -destination name="Apple TV 4K (3rd generation)" -scheme "SkeletonUISnapshotTests"
xcodebuild test -destination name="iPhone 8" -scheme "SkeletonUISnapshotTests"
xcodebuild test -destination name="iPhone 14 Pro Max" -scheme "SkeletonUISnapshotTests"
xcodebuild test -destination name="iPad Pro (12.9-inch) (6th generation)" -scheme "SkeletonUISnapshotTests"
